package com.xyyhome.web.system.domain;

import javax.persistence.*;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_r_group_authority", schema = "xyyhome", catalog = "")
public class YSRGroupAuthority {
    private String ysrgaId;
    private String ysrgaGroupCode;
    private String ysrgaAuthorityCode;
    private String ysrgaRemark;

    @Id
    @Column(name = "ysrga_id", nullable = false, length = 36)
    public String getYsrgaId() {
        return ysrgaId;
    }

    public void setYsrgaId(String ysrgaId) {
        this.ysrgaId = ysrgaId;
    }

    @Basic
    @Column(name = "ysrga_group_code", nullable = true, length = 36)
    public String getYsrgaGroupCode() {
        return ysrgaGroupCode;
    }

    public void setYsrgaGroupCode(String ysrgaGroupCode) {
        this.ysrgaGroupCode = ysrgaGroupCode;
    }

    @Basic
    @Column(name = "ysrga_authority_code", nullable = true, length = 36)
    public String getYsrgaAuthorityCode() {
        return ysrgaAuthorityCode;
    }

    public void setYsrgaAuthorityCode(String ysrgaAuthorityCode) {
        this.ysrgaAuthorityCode = ysrgaAuthorityCode;
    }

    @Basic
    @Column(name = "ysrga_remark", nullable = true, length = 100)
    public String getYsrgaRemark() {
        return ysrgaRemark;
    }

    public void setYsrgaRemark(String ysrgaRemark) {
        this.ysrgaRemark = ysrgaRemark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSRGroupAuthority that = (YSRGroupAuthority) o;

        if (ysrgaId != null ? !ysrgaId.equals(that.ysrgaId) : that.ysrgaId != null) return false;
        if (ysrgaGroupCode != null ? !ysrgaGroupCode.equals(that.ysrgaGroupCode) : that.ysrgaGroupCode != null)
            return false;
        if (ysrgaAuthorityCode != null ? !ysrgaAuthorityCode.equals(that.ysrgaAuthorityCode) : that.ysrgaAuthorityCode != null)
            return false;
        if (ysrgaRemark != null ? !ysrgaRemark.equals(that.ysrgaRemark) : that.ysrgaRemark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ysrgaId != null ? ysrgaId.hashCode() : 0;
        result = 31 * result + (ysrgaGroupCode != null ? ysrgaGroupCode.hashCode() : 0);
        result = 31 * result + (ysrgaAuthorityCode != null ? ysrgaAuthorityCode.hashCode() : 0);
        result = 31 * result + (ysrgaRemark != null ? ysrgaRemark.hashCode() : 0);
        return result;
    }
}
